package com.heima.schedule.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.schedule.dtos.TaskDto;
import com.heima.schedule.service.ITaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 21236
 */
@RestController
public class TaskController {

    @Autowired
    private ITaskService taskService;

    @PostMapping("/task/addTask")
    public ResponseResult addTask(@RequestBody TaskDto dto){
        return ResponseResult.okResult(taskService.addTask(dto));
    }
}
